package cn.offcn.controller;

import cn.offcn.entity.Person;
import cn.offcn.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/person")
public class PersonController {

    @Autowired
    private PersonService personService;

    @RequestMapping("/getPersonById")
    @ResponseBody
    public Person getPersonById(Integer id){

        return personService.findPersonById(id);
    }

}
